From 3e8060a2b8283dcf11d55fc7763e5882983bde4b Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 4 Oct 2005 16:08:18 +0000 Subject: [PATCH] Trim trailing spaces when reading description. Provide default icon if none given. --- pcx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcx.c b/pcx.c index a78d2f906..4dfa90490 100644 --- a/pcx.c +++ b/pcx.c @@ -92,9 +92,11 @@ data_read(void) date, time, &alt); sscanf(&ibuf[60], "%40c", desc); + symnum = 18; sscanf(&ibuf[116], "%d", &symnum); desc[sizeof(desc)-1] = '\0'; + rtrim(desc); name[sizeof(name)-1] = '\0'; wpt_tmp = waypt_new(); wpt_tmp->altitude = alt; -- 2.30.2